/*
 * sum_max.c
 *
 *  Created on: 2012-8-30
 *      Author: miracle
 */
#include"all.h"
void sum_max(int *sr1, int *sum, int size){
	int i = 0;
	int temp = 0;
			*sum = 0;
			for(i = 0; i < size; i++){
				temp = sr1[i]+sr1[i+1]+sr1[i+2];
				if(temp > *sum){
					*sum = temp;
				}
			}
}

